#include <stdio.h>
#define maxn 105
int main()
{
    #ifdef LOCAL
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
    int a[maxn],count=0,x;
    while(scanf("%d",&x)==1)
        a[count++] = x;
    for(int i = count-1;i>=1;i--){
        printf("%d ",a[i]);
    }
    printf("%d\n",a[0]);
    return 0;
}